Repository navigation
Conversation
补齐 introduce-rust-codeguard-cli 变更的设计文档与规格缺口: - command-architecture / static-check-catalog / false-positive-allowlist: 命令面、静态检查目录与已知误报处置 - legacy-delta-20260924 / legacy-v1-protocol-map:遗留实现与 v1 协议映射, 明确哪些是迁移债、哪些是已完成 - project-initialization:项目初始化能力规格 - architecture / technical-design / coverage-and-acceptance / remediation-workflow 与各 specs 同步更新,新增 implementation-coverage 汇总覆盖情况 本次提交与 Agent Plugins 可移植布局迁移无关,单独成commit 以便独立回滚。
此前仅发布各客户端专属清单(.codex-plugin/、.zcode-plugin/、kimi.plugin.json), 不符合 Agent Plugins 规范。符合规范的客户端会因缺少根清单而整体拒绝该插件, 其中的 68 个技能一个也加载不到(§5.1/§5.3:缺清单是致命错误,不是警告)。 - 新增根 plugin.json:$schema 常量 + name 约束 + 封闭字段集;客户端专属的 interface 等数据移入 extensions["com.openai"] / extensions["ai.nanoco.nanoclaw"] - version 取基础版本,+codex.<stamp> 构建元数据留在兼容通道 - 新增客户端扩展目录,让非可移植的 commands/hooks/agents 对注册表客户端可见: - 新增 `com.github.copilot/`(VS Code 与 GitHub Copilot 共用) - 新增 `dev.openhands/`(OpenHands) 根目录副本保留,Codex/ZCode/Kimi 通道不受影响 - 新增 scripts/validate_portable_plugin.py:纯标准库、无网络,按发布 schema 校验清单、技能发现与镜像漂移 - 新增 docs/portable-migration.md 记录迁移内容与客户端覆盖 校验:19/19 包通过规范校验;4655 个测试,红色套件 9 个且全部为迁移前既有失败, 本次迁移零新增失败。 仓库内同步调整: - scripts/check_architecture.py:把 scripts/validate_portable_plugin.py 登记进 SCRIPT_ROLES(角色 entry),否则未分类顶层脚本会触发架构门禁。
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0d5e8baff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Codeguard Rust CLI 设计文档 | ||
|
|
||
| 状态:设计基线,尚未实现。日期:2026-09-24。源码核对基线:`03ebb24`;后续实现必须重新核对工作树和已合并规格。 | ||
| 状态:设计基线已完成,工程基线部分实施;原生检查、修复闭环和宿主验收尚未完成。日期:2026-09-24。原设计源码基线为 `03ebb24`,当前 HEAD `9e4adb1` 的增量见下表;后续实现仍须核对工作树和已合并规格。 |
There was a problem hiding this comment.
Bump the plugin version for this documentation release
This commit changes the published Rust CLI documentation and specifications but leaves all plugin manifests at 0.16.1, so installed users will not receive an update notification containing these changes. Run the required patch release workflow so the catalog and all manifests are regenerated consistently.
AGENTS.md reference: AGENTS.md:L17-L27
Useful? React with 👍 / 👎.
| ### Requirement: Projects SHALL have an explicitly initialized remediation workspace | ||
|
|
||
| Codeguard MUST 支持 `./codeguard/` 及其中的 .gitignore、工作区清单、脱敏 findings/events、任务与决策引用;原始 reports/runs/cache/worktrees/state MUST 默认 Git 忽略。初始化 MUST 提供 dry-run/apply,不覆盖已有用户文件,不创建第二份质量策略。 | ||
| Codeguard MUST 支持 `./.codeguard/` 及其中的 .gitignore、工作区清单、脱敏 findings/events、任务与决策引用;原始 reports/runs/cache/worktrees/state MUST 默认 Git 忽略。初始化 MUST 提供 dry-run/apply,不覆盖已有用户文件,不创建第二份质量策略。 |
There was a problem hiding this comment.
Align all workspace references with
.codeguard
Changing the normative workspace path to ./.codeguard/ leaves the current proposal (proposal.md:19), design decision D12 (design.md:32), and verification summary (verification.md:69) declaring ./codeguard/. Implementers following those documents would create a different, non-hidden directory with different scan behavior, so update the remaining current references or explicitly label them as legacy paths.
AGENTS.md reference: AGENTS.md:L48-L50
Useful? React with 👍 / 👎.
|
|
||
| 以下为初版设计默认值,实施时必须随命令schema/version固化,并通过真实项目测量验证;不宣称适合所有项目。运行参数优先级为 CLI > 已登记环境变量 > 项目运行默认 > 发行内置默认,报告记录最终值和来源。未知环境变量不成为隐式开关。 | ||
|
|
||
| 当前 Rust 局部检查入口已登记 `CODEGUARD_TIMEOUT`,与 `--timeout` 使用相同的 ms/s/m/h 格式及 1ms–24h 边界。项目可选 `.codeguard/runtime.json` 作为更低优先级的运行默认值;文件必须是非链接的有界普通 JSON,只接受以下版本化结构,不由 `init` 自动创建,也不能写质量排除或批准字段: |
There was a problem hiding this comment.
Keep runtime defaults out of hidden paths
This introduces .codeguard/runtime.json as an automatically discovered source of timeout and concurrency settings, but hidden files and directories must be excluded from discovery and checking except for secret checks and linter-configuration discovery. Runtime scheduling options are neither exception, so this contract adds a prohibited third hidden-file discovery path; place the defaults in a non-hidden configuration location or obtain an explicit policy exception.
AGENTS.md reference: AGENTS.md:L48-L50
Useful? React with 👍 / 👎.
|
|
||
| | language ID | 基线状态 | 实施任务ID | 验收要求 | | ||
| |---|---|---|---| | ||
| | java | stable | 6.1-6.7 | 六槽位适用性+真实工具正反例+F01–F26适用场景 | |
There was a problem hiding this comment.
Include task 6.8 in the Java coverage row
The table says each language row traces all six capability slots, but Java stops at 6.1-6.7 even though the newly added task 6.8 is the Java dependency-governance implementation and C36 explicitly maps Java dependencies to 6.8. As written, consumers of this coverage index can treat Java's six-slot migration as covered without ever executing or verifying its dependency slot.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,17 @@ | |||
| # 旧实现增量核对(2026-09-24) | |||
|
|
|||
| 这份记录为 OpenSpec 1.1 的**进行中证据**。当前插件 HEAD 为 `9e4adb1`;原设计读取的 `03ebb24` 不是最新源码。两提交间旧运行时代码有 9 个文件变化。`scripts/languages.json` 未变,SHA-256 为 `012370f9d83a2daeb3cc87fef292a7509e85b53540ce9adf1eaf171f0910d251`,仍是 54 stable / 3 planned。逐语言差异与后续验收入口见 [语言迁移表](coverage-and-acceptance.zh-CN.md#2-全量迁移清单);Rust 工程固定了该清单快照,并在 `codeguard-cli/crates/codeguard-cli/tests/capability_inventory.rs` 核验 57×5×5 个显式缺口,不能把旧注册状态当作新能力。 | |||
There was a problem hiding this comment.
Correct the capability-matrix dimensions
This new audit record claims the inventory test covers 57×5×5 cells, but the change adds dependencies as a sixth category and verification.md:130 records the upgraded matrix as 57×5×6 = 1710. The stated 1,425-cell evidence therefore omits all 285 dependency cells and understates what must be covered; update this record to the six-category result or explicitly identify it as obsolete pre-upgrade evidence.
Useful? React with 👍 / 👎.
| #### Scenario: Invalid selected jobs budget | ||
| - **WHEN** 选中的 `--jobs`、登记环境或项目默认值为零、负数、超过 64 或非十进制整数 | ||
| - **THEN** 启动原生工具前返回 2;较高优先级的有效值覆盖较低优先级的无效环境值,项目文件被选中时仍须整体严格校验 |
There was a problem hiding this comment.
Classify malformed project defaults consistently
This scenario makes an invalid project-sourced jobs value a usage error with exit 2, while the same specification at line 291 classifies an invalid project runtime default as a preparation failure and the npm scenario returns incomplete. Because both values come from the same shared runtime-options document rather than CLI syntax, different fields would produce different recovery classes for the same malformed project configuration; define one exit classification consistently.
Useful? React with 👍 / 👎.
| 静态审计必须检查:每个Requirement恰有一行;每个task至少被一个Requirement关联;35个命令、57个语言、5个平台、3个宿主均可定位;所有任务引用存在;阶段依赖无循环,验收输入和实施产物分开。语义覆盖另由设计逐项对照和独立读者审查,不能用编号数量代替。 | ||
|
|
||
| 当前所有实现任务保持未勾选。索引通过只能声称“当前已确认设计已拆分并可追踪”,不能声称二进制、低误报指标、平台或宿主已可用。后续若新增设计,必须同轮更新规格、tasks与本索引。 |
There was a problem hiding this comment.
Refresh the coverage audit footer
This purported current audit rule still requires only 35 commands and says every implementation task is unchecked, while the same file now defines C01–C36 and tasks.md contains 13 checked tasks. Consumers following this footer will either omit C36 from their audit or report completed baseline work as pending, so update the command count and derive task status from the declared task source.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2a5b30ced
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Rust 文档已迁移 | ||
|
|
||
| 状态:设计基线,尚未实现。日期:2026-09-24。源码核对基线:`03ebb24`;后续实现必须重新核对工作树和已合并规格。 | ||
| Rust CLI 的设计文档、进行中的 OpenSpec change、任务与验收记录已整体迁至独立 [codeguard 仓库](https://github.com/full-stack-plugins/codeguard)。本页仅作导航,不维护第二份 Rust 规范或任务。 |
There was a problem hiding this comment.
Bump the plugin version for the migration release
The earlier review covered the prior documentation additions; fresh evidence here is that this commit now replaces them with a migration stub and removes the in-repository Rust specifications while every plugin manifest remains at 0.16.1. Without running the patch release workflow, installed users will not be notified of this published documentation and specification relocation.
AGENTS.md reference: AGENTS.md:L17-L27
Useful? React with 👍 / 👎.
| 本次需求的唯一规范性事实源为 `openspec/changes/introduce-rust-codeguard-cli/specs/`。这些说明文档展开设计,不创建第二套任务状态。仓库 `openspec/specs/` 与 [当前架构](../current-architecture.md) 仍描述已落地的旧运行时;本 change 未实施前不得宣称 Rust 行为已经生效。 | ||
|
|
||
| 本次验收记录见 [verification.md](../../openspec/changes/introduce-rust-codeguard-cli/verification.md)。文档校验成功不代表二进制、扫描器或宿主运行验收成功。 | ||
| 本插件的旧运行时及宿主规范仍在本仓 `openspec/specs/`;Rust 集成接口在新仓维护,宿主实际接线仍由本插件实现和验收。迁移于 2026-09-28 在本地完成;远程链接须随两仓后续提交推送生效。 |
There was a problem hiding this comment.
Publish the destination before removing the local specifications
When this commit is published before the companion repository push—the rollout state explicitly anticipated here—all local Rust design and OpenSpec files have already been deleted, while every replacement link still depends on that later push. Coordinate the destination publication first (or retain the local files until it is available) so users never land in a revision with neither the specifications nor working navigation.
Useful? React with 👍 / 👎.
|
关闭:此 PR 的内容已过时。 该分支基于迁移前的 main,携带 docs/rust-cli 与 introduce-rust-codeguard-cli 变更的旧版快照。此后 main 已推进到 v0.18.x:introduce-rust-codeguard-cli 变更已归档、docs/rust-cli 已重组。当前 PR 相对 main 的 diff 为 +6/−1925 行——合并将回删这些后续工作。 内容保留在 |
Rust CLI 的设计、规范与任务原先留在插件仓,容易与独立 codeguard 仓库产生冲突。此变更将其统一迁至 https://github.com/full-stack-plugins/codeguard ,插件只保留导航及宿主自身职责。
Codeguard 对应提交:1cd0451,包含 .codeguard 工作区调整、npm 入口、中英文主文档、八个独立专题及完整 OpenSpec change。旧规范在目标仓保留迁移清单和整合记录;插件不再维护第二份 Rust 任务。
验证:插件技能离线/在线一致性、Agent Plugins v1.0.0 结构、架构边界和差异空白检查通过;Rust 全工作区 992 项通过、0 失败、101 忽略,OpenSpec strict 和 607 个本地链接/锚点检查通过。忽略项不计作原生工具验收。本 PR 相对 main 仅有文档和规范迁移,保留 main 已合并的钩子和校验器加固。